import { memo, useEffect, useState } from "react";
import { Card, DatePicker, Input, message, Modal, Skeleton, Table } from "antd";
import * as echarts from "echarts";
import {
  GetIndexPageDataService,
  GetIndexPageLocationDataService,
  LogoutService,
  ReadUserService,
} from "@/service";
import CountUp from "react-countup";
import { useDispatch, useSelector } from "react-redux";
import { IDispatch, IStore, ResetSliceActions } from "@/store";
import { useLocation, useNavigate } from "react-router-dom";
import dayjs from "dayjs";
import { SocketServer } from "@/App";
const IndexPage = memo(() => {
  const dispatch = useDispatch<IDispatch>();
  const userStore = useSelector((state: IStore) => state.user);
  const _ = useLocation();
  const [updateUser, setUpdateUser] = useState<any>({});
  const navigate = useNavigate();
  useEffect(() => {
    console.log("=> userStore ", userStore);
    if (userStore.user != null) {
      setUpdateUser({
        user_name: userStore.user.user_name,
        phone: userStore.user.phone,
        email: userStore.user.email,
        password: userStore.user.password,
        order_prefix: userStore.user.order_prefix,
      });
    }
  }, []);
  return (
    <div>div</div>
  );
});

export default IndexPage;
